﻿ 
<table width="100%" class="left_xx">
    <tr>
        <th colspan="2" style="text-align: center; font-size: 16px; font-weight: bold; line-height: 32px; height: 32px;">审批意见栏</th>
    </tr>

    @{  
        if (!string.IsNullOrEmpty(Request["ViewDetail"]))
        {
            Html.RenderPartial("UCFormViewDetailCheckLog");
        }
        else
        {
            if (string.IsNullOrEmpty(Request["AppInstanceID"]))
            {
                Html.RenderPartial("UCNewFormCheckLog");
            }
            else
            {
                Wf5.Engine.Business.IWorkflowService service = new Wf5.Engine.Business.WorkflowService();
                FCDB.Entity.WfProcessInstance ProcessInstance = service.GetProcessInstance(int.Parse(Request["AppInstanceID"])); 
                if (ProcessInstance.ProcessState == (int)Wf5.Engine.Common.ProcessStateEnum.Running)
                {
                    Html.RenderPartial("UCFormRunningCheckLog");
                }
                if (ProcessInstance.ProcessState == (int)Wf5.Engine.Common.ProcessStateEnum.Discarded)
                {
                    Html.RenderPartial("UCFormDiscardedCheckLog");
                }
                if (ProcessInstance.ProcessState == (int)Wf5.Engine.Common.ProcessStateEnum.Completed)
                {
                    Html.RenderPartial("UCFormCompletedCheckLog");
                }
                if (ProcessInstance.ProcessState == (int)Wf5.Engine.Common.ProcessStateEnum.Canceled)
                {
                    Html.RenderPartial("UCFormCanceledCheckLog");
                }
            }
        }
    }
</table>

